package yun.web.springmvc.interceptor;

public class InterceptorResult {
    // true 表示通过校验
    public Boolean flag;

    public String forward;

    public String redirect;

    public String getRedirect() {
        return redirect;
    }

    public InterceptorResult setRedirect(String redirect) {
        this.redirect = redirect;
        return this;
    }

    public String getForward() {
        return forward;
    }

    public InterceptorResult setForward(String forward) {
        this.forward = forward;
        return this;
    }

    /*
    flag 为 true时, 忽略所有属性, 进行下一个拦截器
    flag 为 false时,
     优先处理 forward, redirect, 若无, 则将r返回客户端, 状态码200

    * */
    public Object r;

    public Boolean getFlag() {
        return flag;
    }

    public InterceptorResult setFlag(Boolean flag) {
        this.flag = flag;
        return this;
    }

    public Object getR() {
        return r;
    }

    public InterceptorResult setR(Object r) {
        return this;
    }

    public InterceptorResult(Boolean flag) {
        this.flag = flag;
    }

    public InterceptorResult(Boolean flag, Object r) {
        this.flag = flag;
        this.r = r;
    }


}
